<script  lang="jsx">
export default {
  name: 'MultColumns',
  functional: true,
  props: {
    columns: {
      type: Array,
      default: () => []
    }
  },
  render(_, { props, scopedSlots }) {
    const { columns } = props
    return columns.map(col => {
      const { children, ...props } = col
      return (
        <el-table-column align='center' {...{ props, scopedSlots }} >
          { children && <mult-columns columns={children} scopedSlots={scopedSlots}/> }
        </el-table-column>
      )
    })
  }
}
</script>